<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>光束效果</title>
    <style>
        .box {
            position: relative;
            width: 200px;
            height: 200px;
            background-color: pink;
        }

        .box::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 30%;
            height: 100%;
            /* border: 1px solid black; */
            overflow: hidden;
            transform: skewX(-25deg);
            background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0)0, rgba(255, 255, 255, .2)50%, rgba(255, 255, 255, 0)100%);
        }
        .box:hover::after {
            left: 200%;
            transition: all 1s ease;
        }
    </style>
</head>

<body>
    <div class="box">
        Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus reiciendis illum cum, quae voluptates, corrupti
        vel porro pariatur aut rerum, voluptatum quam recusandae quia quaerat earum rem. Veniam, nesciunt cum.
    </div>
</body>

</html>